package com.qf.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.mapper.DtsUserMapper;
import com.qf.vo.DayStatis;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jiangjingbo
 * @version V1.0
 * @Project java2203
 * @Package com.qf.service
 * @Description:
 * @Date 2022/6/18 13:59
 */
@Service
public class UserTotalServiceimpl implements UserTotalService {

    @Autowired
    private DtsUserMapper userMapper;
    /**
     * 查询用户数量
     * @return
     */
    @Override
    public int UserTotalcount() {
        QueryWrapper queryWrapper =new QueryWrapper();
        queryWrapper.eq("deleted",false);
        Integer integer = userMapper.selectCount(queryWrapper);
        return integer;
    }

    /**
     * 查询每日用户增长数量
     * @return
     */
    @Override
    public List<DayStatis> incrCount() {
        List<DayStatis> dayStatis = userMapper.staticIncreaseUser();
        return dayStatis;
    }
}
